﻿
@{
    ViewData["Title"] = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using DH.Core.Helper

@using Microsoft.AspNetCore.Mvc.Localization
@inject IHtmlLocalizer<SharedResources> SharedLocalizer

<div id="appModel" style="text-align: center;">

    <div style="width:99.5%;display: inline-block;text-align: left;">
            
        <div id="toolbar">
            <div class="btn-group">
                @*<a class="btn btn-default" onclick="$dh.reload()"><span class="glyphicon glyphicon-refresh"></span></a>*@
                <!--开发者才有的权限-->
                @*@{
                var isDevelpoer = this.ViewBag.CurrentUser.IsDeveloper;
                if (isDevelpoer)
                {
                    <button class="btn btn-default" onclick="_vmBase.InitFeatures();"><i class="fa fa-upload"></i>@SharedLocalizer["InitFeatures"]</button>
                }
                }*@
                @await Html.PartialAsync("_Partical_Button")

            </div>

        </div>

        <div class="table-responsive" style="width:100%">
            <table class="table table-no-bordered " id="tb_features"></table>
        </div>

        <div id="uiViewButtonsDiv">
            <div class="panel panel-default">
                <div class="panel-heading">视图功能按钮列表</div>
                <div class="panel-body">
                    <div id="uiViewButtonBar">
                        <div class="btn-group">
                            <button class="btn btn-default" onclick="_vmBase.submitUiViewBtnFuncs();"><i class="fa fa-check"></i>保存</button>
                        </div>
                    </div>
                    <table class="table table-no-bordered " id="tb_uiViewButtons"></table>
                </div>

            </div>
        </div>
    </div>

</div>

<!--启用 filter 功能-->
<link href="~/lib/bootstrap-table/src/extensions/filter-control/bootstrap-table-filter-control.css" rel="stylesheet" />
<script src="~/lib/bootstrap-table/src/extensions/filter-control/bootstrap-table-filter-control.js"></script>

@this.RefScript("~/content/js/base.js")
<script type="text/javascript">

    var _getTableListUrl = "@this.Href("~/Features/GetFeatures")";
    var _initResource = "@this.Href("~/Features/InitFeatures")";
    var _getResourceTypeUrl = "@this.Href("~/Category/GetResourceTypeSelect")";
    var _getButtonsUrl = "@this.Href("~/Button/GetButtons")";
    var _getFuncsUrl = "@this.Href("~/Features/GetFuncs")"; //获取功能集
    var _saveUiViewFeaturesUrl = "@this.Href("~/Features/SaveUiViewButtonsFunc")";
    var _getUiViewFeaturesUrl = "@this.Href("~/Features/GetUiViewButtonsFunc")";
    

    var _featuresUIViewType = "@ConstHelper.FeaturesUIViewType";
    var _featuresFuncType = "@ConstHelper.FeaturesFuncType";

    var _initFeatureStr = "@SharedLocalizer["InitFeatures"]";

    var _isMangeStr = "是";
    var _isNotManageStr = "否";

    var _resourceTypeSelect = {};
    var _isManageSelect = {
        "true": _isMangeStr,
        "false": _isNotManageStr

    };

</script>
<script src="~/js/Views/Features/Index.js"></script>
